﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudDcPc.Entity
{
    public class Order
    {
        public Order()
        {

        }
        public Order(string tab_name,string uname,int tab_size,int id, string order_num, int tab_num, string vip_num, int size, int time_type, string user_num, string time, string book_time,int type,string note,int haschecked)
        {
            Tab_name = tab_name;
            Uname = uname;
            Tab_size = tab_size;
            Id = id;
            Order_num = order_num;
            Tab_num = tab_num;
            Vip_num = vip_num;
            Size = size;
            Time_type = time_type;
            User_num = user_num;
            Time = time;
            Book_time = book_time;
            Type = type;
            Note = note;
            Haschecked = haschecked;
        }
        private string together_name;

        public string Together_name
        {
            get { return together_name; }
            set { together_name = value; }
        }

        private float together_price;

        public float Together_price
        {
            get { return together_price; }
            set { together_price = value; }
        }
        private string book_time;

        public string Book_time
        {
            get { return book_time; }
            set { book_time = value; }
        }

        public override string ToString()
        {
            string tTime = Type == 1 ? Time : Book_time;
            if (Type == 2 && Time != "")
            {
                tTime = Time;
            }
            string tType = "";
            if (Time == "" && Book_time != "")
            {
                tType = "预定";
            }else {
                tType = "用餐中";
            }

            if (Note != "" && Note!="null")
                {
                    tType += "(备:"+Note+")";
                }string tTime_type = "早餐";
            if (Time_type == 2)
                tTime_type = "午餐";
            if (Time_type == 3)
                tTime_type = "晚餐";
            return tTime + "——" + tTime_type + "——" + tType;
        }

        private string tab_name;

        public string Tab_name
        {
            get { return tab_name; }
            set { tab_name = value; }
        }
        
        private string uname;

        public string Uname
        {
            get { return uname; }
            set { uname = value; }
        }


        private int tab_size;

        public int Tab_size
        {
            get { return tab_size; }
            set { tab_size = value; }
        }

        private int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        private string order_num;

        public string Order_num
        {
            get { return order_num; }
            set { order_num = value; }
        }
        private int tab_num;

        public int Tab_num
        {
            get { return tab_num; }
            set { tab_num = value; }
        }
        private string vip_num;

        public string Vip_num
        {
            get { return vip_num; }
            set { vip_num = value; }
        }
        private int size;

        public int Size
        {
            get { return size; }
            set { size = value; }
        }
        private int time_type;

        public int Time_type
        {
            get { return time_type; }
            set { time_type = value; }
        }
        private string user_num;

        public string User_num
        {
            get { return user_num; }
            set { user_num = value; }
        }
        private string time;

        public string Time
        {
            get { return time; }
            set { time = value; }
        }
        private int type;

        public int Type
        {
            get { return type; }
            set { type = value; }
        }

        private string note;

        public string Note
        {
            get { return note; }
            set { note = value; }
        }
        private int haschecked;

        public int Haschecked
        {
            get { return haschecked; }
            set { haschecked = value; }
        }

    }
}
